<?php
	// Load the QCubed Development Framework
	require('../includes/prepend.inc.php');

	/**
	 * This is a quick-and-dirty draft QForm object to do the List All functionality
	 * of the TableUserProject class.  It uses the code-generated
	 * TableUserProjectDataGrid control which has meta-methods to help with
	 * easily creating/defining TableUserProject columns.
	 *
	 * Any display customizations and presentation-tier logic can be implemented
	 * here by overriding existing or implementing new methods, properties and variables.
	 * 
	 * NOTE: This file is overwritten on any code regenerations.  If you want to make
	 * permanent changes, it is STRONGLY RECOMMENDED to move both table_user_project_list.php AND
	 * table_user_project_list.tpl.php out of this Form Drafts directory.
	 *
	 * @package My Application
	 * @subpackage Drafts
	 */
	class TableUserProjectListForm extends QForm {
		// Local instance of the Meta DataGrid to list TableUserProjects
		protected $dtgTableUserProjects;

		// Create QForm Event Handlers as Needed

//		protected function Form_Exit() {}
//		protected function Form_Load() {}
//		protected function Form_PreRender() {}
//		protected function Form_Validate() {}

		protected function Form_Run() {
			// Security check for ALLOW_REMOTE_ADMIN
			// To allow access REGARDLESS of ALLOW_REMOTE_ADMIN, simply remove the line below
			QApplication::CheckRemoteAdmin();
		}

		protected function Form_Create() {
			// Instantiate the Meta DataGrid
			$this->dtgTableUserProjects = new TableUserProjectDataGrid($this);

			// Style the DataGrid (if desired)
			$this->dtgTableUserProjects->CssClass = 'datagrid';
			$this->dtgTableUserProjects->AlternateRowStyle->CssClass = 'alternate';

			// Add Pagination (if desired)
			$this->dtgTableUserProjects->Paginator = new QPaginator($this->dtgTableUserProjects);
			$this->dtgTableUserProjects->ItemsPerPage = 20;

			// Use the MetaDataGrid functionality to add Columns for this datagrid

			// Create an Edit Column
			$strEditPageUrl = __VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/table_user_project_edit.php';
			$this->dtgTableUserProjects->MetaAddEditLinkColumn($strEditPageUrl, 'Edit', 'Edit');

			// Create the Other Columns (note that you can use strings for table_user_project's properties, or you
			// can traverse down QQN::table_user_project() to display fields that are down the hierarchy)
			$this->dtgTableUserProjects->MetaAddColumn('Id');
			$this->dtgTableUserProjects->MetaAddColumn('CategoryId');
			$this->dtgTableUserProjects->MetaAddColumn('SubcategoryId');
			$this->dtgTableUserProjects->MetaAddColumn('UserName');
			$this->dtgTableUserProjects->MetaAddColumn('Password');
			$this->dtgTableUserProjects->MetaAddColumn('Firstname');
			$this->dtgTableUserProjects->MetaAddColumn('Lastname');
			$this->dtgTableUserProjects->MetaAddColumn('Companyname');
			$this->dtgTableUserProjects->MetaAddColumn('Mail');
			$this->dtgTableUserProjects->MetaAddColumn('Mail2');
			$this->dtgTableUserProjects->MetaAddColumn('Ip');
			$this->dtgTableUserProjects->MetaAddColumn('Country');
			$this->dtgTableUserProjects->MetaAddColumn('City');
			$this->dtgTableUserProjects->MetaAddColumn('Address1');
			$this->dtgTableUserProjects->MetaAddColumn('Address2');
			$this->dtgTableUserProjects->MetaAddColumn('PostalCode');
			$this->dtgTableUserProjects->MetaAddColumn('Phone');
			$this->dtgTableUserProjects->MetaAddColumn('Fax');
			$this->dtgTableUserProjects->MetaAddColumn('LoginDate');
			$this->dtgTableUserProjects->MetaAddColumn('LogoutDate');
			$this->dtgTableUserProjects->MetaAddColumn('TimeupDate');
			$this->dtgTableUserProjects->MetaAddColumn('UserType');
			$this->dtgTableUserProjects->MetaAddColumn('UserLevel');
			$this->dtgTableUserProjects->MetaAddColumn('BoothCount');
			$this->dtgTableUserProjects->MetaAddColumn('PortfolioCount');
			$this->dtgTableUserProjects->MetaAddColumn('PointBalance');
			$this->dtgTableUserProjects->MetaAddColumn('PointInTotal');
			$this->dtgTableUserProjects->MetaAddColumn('PointOutTotal');
			$this->dtgTableUserProjects->MetaAddColumn('PointChargedTotal');
			$this->dtgTableUserProjects->MetaAddColumn('LanguageId');
			$this->dtgTableUserProjects->MetaAddColumn('SendmailNews');
			$this->dtgTableUserProjects->MetaAddColumn('SendmailByKeywordInNewProject');
			$this->dtgTableUserProjects->MetaAddColumn('SendmailByNewBid');
			$this->dtgTableUserProjects->MetaAddColumn('Keyword');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer6month');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider6month');
			$this->dtgTableUserProjects->MetaAddColumn('Authorized');
			$this->dtgTableUserProjects->MetaAddColumn('AuthorizationCode');
			$this->dtgTableUserProjects->MetaAddColumn('AuthorizedDate');
			$this->dtgTableUserProjects->MetaAddColumn('Active');
			$this->dtgTableUserProjects->MetaAddColumn('Suspended');
			$this->dtgTableUserProjects->MetaAddColumn('AffiliatorId');
			$this->dtgTableUserProjects->MetaAddColumn('AffliatorCode');
			$this->dtgTableUserProjects->MetaAddColumn('FirstnameKana');
			$this->dtgTableUserProjects->MetaAddColumn('LastnameKana');
			$this->dtgTableUserProjects->MetaAddColumn('Department');
			$this->dtgTableUserProjects->MetaAddColumn('RegisterDate');
			$this->dtgTableUserProjects->MetaAddColumn('PercentageWillCharge');
			$this->dtgTableUserProjects->MetaAddColumn('LastAccessDate');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer1');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer2');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer3');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer4');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer5');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsBuyer6');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider1');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider2');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider3');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider4');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider5');
			$this->dtgTableUserProjects->MetaAddColumn('RateAsProvider6');
		}
	}

	// Go ahead and run this form object to generate the page and event handlers, implicitly using
	// table_user_project_list.tpl.php as the included HTML template file
	TableUserProjectListForm::Run('TableUserProjectListForm');
?>